package com.example.layui.config;

import com.example.layui.pojo.Order;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
public class SendConfig {
    @Autowired
    RabbitTemplate rabbitTemplate;

    public void send(Order order){
        rabbitTemplate.convertAndSend("TestDirectQueue",order);
    }
}
